<template>
	<view class="SongList">
		<u-navbar title="每日推荐" back-icon-color="#fff" :background="background" title-color="#fff"></u-navbar>
		<view class="u-page">
			<view class="content">
				<view class="header">
					<cover-image src="../../static/img/bgc.jpg" class="img"></cover-image>
				</view>
				<view class="songList">
					<view class="item" v-for="item in sonList" :key="item.id" @click="goPlayer">
						<view class="left">
							<view class="box">
								<u-icon name="bookmark-fill"
								size="50"
								color="#fff"></u-icon>
							</view>
						</view>
						<view class="right">
							<text class="songName">{{item.songName}}</text>
							<text class="fuHao"> —— </text>
							<text class="personName">{{item.name}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { mapState } from "vuex"
	export default {
		data() {
			return {
				background: {},
				sonList: [
					{
						id: 1,
						songName: "我喜欢的12345",
						name: "杨宗纬",
					},
					{
						id: 2,
						songName: "阿珍爱上了阿强",
						name: "周星驰",
					}
				]
			}
		},
		computed: {
			...mapState({
				commonColor: ({config})=>config.commonColor,
			})
		},
		methods: {
			goPlayer() {
				this.$Router.push({
					name: "player"
				})
			}
		},
		created() {
			this.background["backgroundColor"] = this.commonColor;
		}
	}
</script>

<style lang="less" scoped>
.SongList {
	display: flex;
	flex-direction: column;
	height: 100%;
	.u-page {
		flex: 1;
		overflow: hidden;
		padding: 20rpx;
		border-radius: 10rpx;
		.content {
			background-color: #fff;
			.header {
				width: 100%;
				height: 300rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				.img {
					width: 150rpx;
					height: 150rpx;
				}
			}
			.songList {
				width: 100%;
				.item {
					display: flex;
					flex-wrap: wrap;
					align-items: center;
					width: 100%;
					padding: 20rpx 0;
					.left {
						padding: 0 20rpx;
						.box {
							display: flex;
							justify-content: center;
							align-items: center;
							width: 80rpx;
							height: 80rpx;
							background-color: #000;
							opacity: .1;
							border-radius: 10rpx;
						}
					}
					.right {
						font-size: 30rpx;
						letter-spacing: 3rpx;
						.songName {}
						.fuHao {
							padding: 0 20rpx;
						}
						.personName {
							font-size: 20rpx;
							color: #999;
						}
					}
				}
			}
		}
	}
}
</style>
